linear search algorithm with example